package cn.nawang.ebeim.api.utils;

import java.util.HashMap;
import java.util.Map;

/**
 * @ClassName: Constant
 * @Description: TODO
 * @author 许炜毅
 * @date 2015年8月5日 下午2:02:06
 * @version v1.0
 */
public class Constant {

  public static final int CODE_SUCCESS = 200;
  public static final int CODE_ERROR = 500;
  // 服务到期时间
  public static final int SERVER_YEAR = 1;

  // reids超时时长
  public static final int REDIS_TIMEOUT = 3600;

  public static String DESKEY = "nawangdeedgnawan";

  public static String LICENSE_PATH = "F:/license";

  // 个人网盘默认空间大小
  public static final String TERMINAL_SPACE_SIZE = "10";

  // 查询列表大小
  public static final int QUERY_COUNT = 100;

  // 默认授权有效期
  public static final int LICENSE_VALIDITY_PERIOD = 10;

  // 终端编号前缀编号
  public static final String TERMINAL_ID_PREFIX = "TM-";
  // 授权信息前缀编号
  public static final String LICENSE_ID_PREFIX = "LIC-";

  public static final String TERMINAL_DESCRIPTION = "个人网盘";

  public static Map<String, String> DATASOURCE_TRUE_OR_FALSE = new HashMap<String, String>();
  public static final String DATASOURCE_TRUE = "0";// true
  public static final String DATASOURCE_FALSE = "1";// false

  // 绑定结果
  public static Map<String, String> BIND_RESULT = new HashMap<String, String>();
  public static final String BIND_RESULT_SAVE_SUCCESS = "00";// 保存成功
  public static final String BIND_RESULT_PARAM_ERROR = "98";// 参数（鉴权）校验错误
  public static final String BIND_RESULT_BIND = "01";// 设备被绑定
  public static final String BIND_RESULT_TERMINAL_NULL = "02";// 设备不存在
  public static final String BIND_RESULT_USER_NULL = "03";// 用户不存在
  public static final String BIND_RESULT_USER_NOT = "04";// 用户不属于该客户
  public static final String BIND_RESULT_CODE_ERROR = "99";// 服务器处理异常
  public static final String BIND_RESULT_NORMAL = "200";// 正常

  // 用户状态
  public static Map<String, String> USER_STATUS_TYPE = new HashMap<String, String>();
  public static final String USER_STATUS_TYPE_ZERO = "0";// 正常
  public static final String USER_STATUS_TYPE_ONE = "1";// 停用

  public static final String LOGIN_USER = "LOGIN_USER";// 登入用户

  // 终端状态
  public static Map<String, String> TERMINAL_STATUS_TYPE = new HashMap<String, String>();
  public static final String TERMINAL_STATUS_TYPE_ZERO = "0";// 正常
  public static final String TERMINAL_STATUS_TYPE_ONE = "1";// 停用

  // 用户类型
  public static Map<String, String> USER_TYPE = new HashMap<String, String>();
  public static final String USER_TYPE_ZERO = "0";// 终端
  public static final String USER_TYPE_ONE = "1";// 个人网盘

  // 密码是否修改
  public static final String NO = "0";// 否
  public static final String YES = "1";// 是

  // 是否是第一次登录
  public static final String USER_IS_FIRST_LOGIN_YES = "0";// 是
  public static final String USER_IS_FIRST_LOGIN_NO = "1";// 否

  // 用户安全等级
  public static Map<String, String> USER_SAFE_LEVEL = new HashMap<String, String>();
  public static final String USER_SAFE_LEVEL_ZERO = "0";// key+动态码

  // 返回前台的code
  public static final String JSON_CODE = "code";// 标签
  public static final String CODE_200 = "200";// 200 成功
  public static final String CODE_404 = "404";// 资源不存在

  // 数据源运行状态
  public static Map<Integer, String> DATESOURCE_RUN_STATUS_TYPE = new HashMap<Integer, String>();
  public static final Integer DATESOURCE_RUN_STATUS_TYPE_ZERO = 0;// 等待备份
  public static final Integer DATESOURCE_RUN_STATUS_TYPE_ONE = 1;// 备份中
  public static final Integer DATESOURCE_RUN_STATUS_TYPE_TWO = 2;// 错误
  public static final Integer DATESOURCE_RUN_STATUS_TYPE_THREE = 3;// 成功
  
  // 数据源状态
  public static Map<Integer, String> DATESOURCE_DS_STATUS_TYPE = new HashMap<Integer, String>();
  public static final Integer DATESOURCE_DS_STATUS_TYPE_ZERO = 0;// 启用
  public static final Integer DATESOURCE_DS_STATUS_TYPE_ONE = 1;// 禁用

  // 数据源类型
  public static Map<String, String> DATESOURCE_TYPE = new HashMap<String, String>();
  public static final String DATESOURCE_TYPE_ZERO = "0";// 文件夹
  public static final String DATESOURCE_TYPE_ONE = "1";// 数据库
  public static final String DATESOURCE_TYPE_TWO = "2";// 数据保险箱

  // 执行方式
  public static Map<String, String> BACKUP_TYPE = new HashMap<String, String>();
  public static final String BACKUP_TYPE_ZERO = "0";// 实时备份
  public static final String BACKUP_TYPE_ONE = "1";// 定时备份
  public static final String BACKUP_TYPE_TWO = "2";// 手动备份


  // 执行时间单位
  public static Map<String, String> BACKUP_PERIOD = new HashMap<String, String>();
  public static final String BACKUP_PERIOD_ONE = "1";// 小时
  public static final String BACKUP_PERIOD_TWO = "2";// 天
  public static final String BACKUP_PERIOD_THREE = "3";// 周
  public static final String BACKUP_PERIOD_FOUR = "4";// 月

  // 备份时间是否修改
  public static Map<String, String> BACKUP_TIME_STATUS = new HashMap<String, String>();
  public static final String BACKUP_TIME_STATUS_ZERO = "0";// 未更新
  public static final String BACKUP_TIME_STATUS_ONE = "1";// 已更新

  public static Map<String, String> TASK_LOG_STATUS = new HashMap<String, String>();
  public static final String TASK_LOG_STATUS_ZERO = "0";// 执行中
  public static final String TASK_LOG_STATUS_TWO = "2";// 成功
  public static final String TASK_LOG_STATUS_THREE = "3";// 失败

  public static Map<String, String> SP_TRANFER_LOG_STATUS = new HashMap<String, String>();
  public static final String SP_TRANFER_LOG_STATUS_ZERO = "0";// 成功
  public static final String SP_TRANFER_LOG_STATUS_ONE = "1";// 失败

  public static Map<String, String> HEART_LOG_LEVEL = new HashMap<String, String>();
  public static final String HEART_LOG_LEVEL_ONE = "1";// 正常
  public static final String HEART_LOG_LEVEL_THREE = "3";// 不正常

  // 用户登录结果
  public static Map<String, String> USER_LOGIN_RESULT = new HashMap<String, String>();
  public static final String USER_LOGIN_RESULT_SUCCESS = "00";// 登录成功
  public static final String USER_LOGIN_RESULT_USERNAME_PASSWORD_ERROR = "01";// 用户名或密码错误
  public static final String USER_LOGIN_RESULT_NO_AUTHORITY = "02";// 用户未授权该前置机
  public static final String USER_LOGIN_RESULT_USER_DISABLE = "03";// 用户已经被禁用
  public static final String USER_LOGIN_RESULT_PARAM_ERROR = "98";// 参数校验错误
  public static final String USER_LOGIN_RESULT_ERROR = "99";// 服务端处理异常
  public static final String USER_LOGIN_RESULT_NORMAL = "200";// 登录验证正常

  // 终端用户类型
  public static Map<String, String> TERMINAL_IS_USER = new HashMap<String, String>();
  public static final String TERMINAL_IS_USER_ZERO = "0";// 物理前置机
  public static final String TERMINAL_IS_USER_ONE = "1";// 网盘用户

  // 加密备份源文件
  public static Map<String, String> TERMINAL_IS_ENCRYPT_SRC = new HashMap<String, String>();
  public static final String TERMINAL_IS_ENCRYPT_SRC_NO = "0";// 不加密
  public static final String TERMINAL_IS_ENCRYPT_SRC_YES = "1";// 加密

  // 加密算法
  public static Map<String, String> TERMINAL_ENCRYPT_SRC_ALG = new HashMap<String, String>();
  public static final String TERMINAL_ENCRYPT_SRC_ALG_RSA = "00";// RSA
  public static final String TERMINAL_ENCRYPT_SRC_ALG_DES = "01";// DES
  public static final String TERMINAL_ENCRYPT_SRC_ALG_3DES = "02";// 3DES
  public static final String TERMINAL_ENCRYPT_SRC_ALG_AES = "03";// AES

  // 终端离线时间超过1小时预警
  public static Map<String, String> TERMINAL_ALERT_OFFLINE = new HashMap<String, String>();
  public static final String TERMINAL_ALERT_OFFLINE_NO = "0";// 不启用
  public static final String TERMINAL_ALERT_OFFLINE_YES = "1";// 启用

  // 灾备任务执行异常
  public static Map<String, String> TERMINAL_ALERT_TASK_ERROR = new HashMap<String, String>();
  public static final String TERMINAL_ALERT_TASK_ERROR_NO = "0";// 不启用
  public static final String TERMINAL_ALERT_TASK_ERROR_YES = "1";// 启用

  // 空间不足预警
  public static Map<String, String> TERMINAL_ALERT_SPACE_LACK = new HashMap<String, String>();
  public static final String TERMINAL_ALERT_SPACE_LACK_NO = "0";// 不启用
  public static final String TERMINAL_ALERT_SPACE_LACK_YES = "1";// 启用

  // 数据源异常预警
  public static Map<String, String> TERMINAL_ALERT_DS_ERROR = new HashMap<String, String>();
  public static final String TERMINAL_ALERT_DS_ERROR_NO = "0";// 不启用
  public static final String TERMINAL_ALERT_DS_ERROR_YES = "1";// 启用

  // 终端授权近效期预警
  public static Map<String, String> TERMINAL_ALERT_LICENSE_OVER_TIME =
      new HashMap<String, String>();
  public static final String TERMINAL_ALERT_LICENSE_OVER_TIME_NO = "0";// 不启用
  public static final String TERMINAL_ALERT_LICENSE_OVER_TIME_YES = "1";// 启用

  // 预警方式
  public static Map<String, String> TERMINAL_ALERT_TYPE = new HashMap<String, String>();
  public static final String TERMINAL_ALERT_TYPE_EMAIL = "0";// 邮件
  public static final String TERMINAL_ALERT_TYPE_MESSAGE = "1";// 短信
  public static final String TERMINAL_ALERT_TYPE_BOTH = "2";// 邮件和短信

  // 是否记录文件变动轨迹
  public static Map<String, String> TERMINAL_IS_RECORD_CHANGE = new HashMap<String, String>();
  public static final String TERMINAL_IS_RECORD_CHANGE_NO = "0";// 不记录
  public static final String TERMINAL_IS_RECORD_CHANGE_YES = "1";// 记录

  // 是否启用SSL传输
  public static Map<String, String> TERMINAL_IS_OPEN_SSL = new HashMap<String, String>();
  public static final String TERMINAL_IS_OPEN_SSL_NO = "0";// 不启用
  public static final String TERMINAL_IS_OPEN_SSL_YES = "1";// 启用

  // 是否启用文件签名（防篡改）
  public static Map<String, String> TERMINAL_IS_SIGNATURE_SRC = new HashMap<String, String>();
  public static final String TERMINAL_IS_SIGNATURE_SRC_NO = "0";// 不启用
  public static final String TERMINAL_IS_SIGNATURE_SRC_YES = "1";// 启用

  // 日志等级
  public static Map<String, String> LOG_LEVEL = new HashMap<String, String>();
  public static final String LOG_LEVEL_DEBUG = "0";// 调试
  public static final String LOG_LEVEL_SUCCESS = "1";// 正常
  public static final String LOG_LEVEL_WARNING = "2";// 预警
  public static final String LOG_LEVEL_ERROR = "3";// 错误

  // 授权
  public static Map<String, String> LICENSE_STATUS = new HashMap<String, String>();
  public static final String LICENSE_STATUS_NO = "0";// 无效
  public static final String LICENSE_STATUS_YES = "1";// 有效
  public static final String LICENSE_SESSION1 = "00";// sessionid为00
  public static final String LICENSE_SESSION2 = "04";// sessionid为04(企业版）
  public static final String LICENSE_SESSION3 = "11";// sessionid为11
  public static final String LICENSE_SESSION4 = "03";// sessionid为03(个人版)

  // 企业版授权验证结果
  public static Map<String, String> TERMINAL_LICENSE_RESULT = new HashMap<String, String>();
  public static final String TERMINAL_LICENSE_RESULT_SUCCESS = "00";// 校验成功
  public static final String TERMINAL_LICENSE_RESULT_UREGISTER = "01";// U盾未注册
  public static final String TERMINAL_LICENSE_RESULT_U_USER = "02";// U盾不属于当前客户
  public static final String TERMINAL_LICENSE_RESULT_U_NOT_ENTERPRISE = "03";// U盾非企业版
  public static final String TERMINAL_LICENSE_RESULT_U_NOT_BIND = "04";// U盾未绑定
  public static final String TERMINAL_LICENSE_RESULT_U_NOT_TERMINAL = "05";// U盾不属于当前前置机
  public static final String TERMINAL_LICENSE_RESULT_DEVICE_NOT_BIND = "11";// 设备未绑定
  public static final String TERMINAL_LICENSE_RESULT_DEVICE_EXIST_ANOTHER_BIND = "12";// 设备已被其他授权绑定
  public static final String TERMINAL_LICENSE_RESULT_LICENSE_NOT_EXIST = "21";// 授权不存在
  public static final String TERMINAL_LICENSE_RESULT_LICENSE_OVERDUE = "22";// 授权已过期
  public static final String TERMINAL_LICENSE_RESULT_LICENSE_REVOKE = "23";// 授权被吊销
  public static final String TERMINAL_LICENSE_RESULT_PARAM_ERROR = "98";// 参数校验错误
  public static final String TERMINAL_LICENSE_RESULT_CODE_ERROR = "99";// 服务端处理异常
  public static final String TERMINAL_LICENSE_RESULT_NORMAL = "200";// 正常


  // 个人版授权验证结果
  public static Map<String, String> PERSONAL_LICENSE_RESULT = new HashMap<String, String>();
  public static final String PERSONAL_LICENSE_RESULT_SUCCESS = "00";// 校验成功
  public static final String PERSONAL_LICENSE_RESULT_UREGISTER = "01";// U盾未注册
  public static final String PERSONAL_LICENSE_RESULT_NOT_PERSONAL = "02";// U盾非个人版
  public static final String PERSONAL_LICENSE_RESULT_U_NOT_BIND = "03";// U盾未绑定
  public static final String PERSONAL_LICENSE_RESULT_DEVICE_NOT_BIND = "11";// 设备未绑定
  public static final String PERSONAL_LICENSE_RESULT_DEVICE_EXIST_ANOTHER_BIND = "12";// 设备已被其他授权绑定
  public static final String PERSONAL_LICENSE_RESULT_LICENSE_NOT_EXIST = "21";// 授权不存在
  public static final String PERSONAL_LICENSE_RESULT_LICENSE_OVERDUE = "22";// 授权已过期
  public static final String PERSONAL_LICENSE_RESULT_LICENSE_REVOKE = "23";// 授权被吊销
  public static final String PERSONAL_LICENSE_RESULT_PARAM_ERROR = "98";// 参数校验错误
  public static final String PERSONAL_LICENSE_RESULT_CODE_ERROR = "99";// 服务端处理异常
  public static final String PERSONAL_LICENSE_RESULT_NORMAL = "200";// 正常

  // STORAGE_FILE_TO_DO状态
  public static Map<String, String> STORAGE_FILE_TO_DO_STATUS = new HashMap<String, String>();
  public static final String STORAGE_FILE_TO_DO_STATUS_NO = "0";// 没有处理
  public static final String STORAGE_FILE_TO_DO_STATUS_YES = "1";// 处理中

  // STORAGE_VERSION_TREE_TO_DO状态
  public static Map<String, String> STORAGE_VERSION_TREE_TO_DO_STATUS =
      new HashMap<String, String>();
  public static final String STORAGE_VERSION_TREE_TO_DO_STATUS_NO = "0";// 没有处理
  public static final String STORAGE_VERSION_TREE_TO_DO_STATUS_YES = "1";// 处理中

  // backupTimeUpdate是否有修改
  public static Map<String, String> BACK_STRATEGY_BACKUP_TIME_UPDATE =
      new HashMap<String, String>();
  public static final String BACK_STRATEGY_BACKUP_TIME_UPDATE_NO = "0";// 未更新
  public static final String BACK_STRATEGY_BACKUP_TIME_UPDATE_YES = "1";// 更新

  // 用户登陆接口(二)处理结果
  public static Map<String, String> USER_LOGIN_SAFT_RESULT = new HashMap<String, String>();
  public static final String USER_LOGIN_SAFT_RESULT_SUCCESS = "00";// 登陆成功
  public static final String USER_LOGIN_SAFT_RESULT_USERNAME_PWD_ERROR = "01";// 用户名或密码错误
  public static final String USER_LOGIN_SAFT_RESULT_LICENSE_NO = "02";// 用户未授权该前置机
  public static final String USER_LOGIN_SAFT_RESULT_USER_NO = "03";// 用户已经被禁用
  public static final String USER_LOGIN_SAFT_RESULT_ERROR = "98";// 参数校验错误
  public static final String USER_LOGIN_SAFT_RESULT_CODE_ERROR = "99";// 服务端处理异常

  // 新增数据源处理集
  public static Map<String, String> Add_RESOURCE = new HashMap<String, String>();
  public static final String Add_RESOURCE_SUCCESS = "00";// 保存成功
  public static final String Add_RESOURCE_SOURCE_EXIST = "01";// 同类配置已经存在
  public static final String Add_RESOURCE_USERSESSION_INVALID = "97";// 同类配置已经存在
  public static final String Add_RESOURCE_PARAM_ERROR = "98";// 参数（鉴权）校验错误
  public static final String Add_RESOURCE_CODE_ERROR = "99";// 服务端处理异常

  public static Map<String, String> HTTP_TOKEN_VERIFY_RESULT = new HashMap<String, String>();
  public static final String HTTP_TOKEN_VERIFY_ZERO = "0";// 令牌被修改过，请重新登录获取可用令牌
  public static final String HTTP_TOKEN_VERIFY_ONE = "1";// 令牌失效，请重新登录获取可用令牌
  public static final String HTTP_TOKEN_VERIFY_TWO = "2";// 令牌的用户不存在，请重新登录获取可用令牌
  public static final String HTTP_TOKEN_VERIFY_THREE = "3";// 令牌的用户被禁用了，请用可用的用户登录获取可用令牌

  public static Map<String, String> LAB_TYPE = new HashMap<String, String>();
  public static final String LAB_TYPE_ZERO = "0";// 无授权
  public static final String LAB_TYPE_ONE = "1";// key无关联设备
  public static final String LAB_TYPE_TWO = "2";// 授权码无关联设备
  public static final String LAB_TYPE_THREE = "3";// key关联设备
  public static final String LAB_TYPE_FOUR = "4";// 授权码关联设备

  public static Map<String, String> ROLE = new HashMap<String, String>();
  public static final String ROLE_SYSADMIN = "SYSADMIN";// 系统管理人员
  public static final String ROLE_ADMIN = "ADMIN";// 客户管理员
  public static final String ROLE_USER = "USER";// 普通用户

  public static Map<String, String> IS_BIND = new HashMap<String, String>();
  public static final String IS_BIND_ZERO = "0";// 未绑定
  public static final String IS_BIND_ONE = "1";// 已绑定

  public static Map<String, String> ENCRYPTION_TYPE = new HashMap<String, String>();
  public static final String ENCRYPTION_TYPE_ZERO = "0";// aes

  // 短信验证结果
  public static Map<String, String> SHORT_MESSAGE_CODE = new HashMap<String, String>();
  public static final String SHORT_MESSAGE_CODE_000000 = "000000";// 验证码发送成功
  public static final String SHORT_MESSAGE_CODE_000001 = "000001";// 验证通过
  public static final String SHORT_MESSAGE_CODE_0000002 = "0000002";// 密钥验证错误
  public static final String SHORT_MESSAGE_CODE_000003 = "000003";// 用户不存在
  public static final String SHORT_MESSAGE_CODE_000004 = "000004";// 用户剩余条数不足
  public static final String SHORT_MESSAGE_CODE_000005 = "000005";// 参数缺失
  public static final String SHORT_MESSAGE_CODE_000006 = "000006";// 参数异常
  public static final String SHORT_MESSAGE_CODE_000007 = "000007";// 链接超时
  public static final String SHORT_MESSAGE_CODE_000100 = "000100";// 系统中不存在此模板ID
  public static final String SHORT_MESSAGE_CODE_000201 = "000201";// 此模板ID不属于此账号
  public static final String SHORT_MESSAGE_CODE_000202 = "000202";// 此模板不是短信模板
  public static final String SHORT_MESSAGE_CODE_000203 = "000203";// 模板状态审核中...暂时无法使用此模板，请更换
  public static final String SHORT_MESSAGE_CODE_000204 = "000204";// 模板审核未通过，无法使用
  public static final String SHORT_MESSAGE_CODE_000205 = "000205";// 短信发送失败
  public static final String SHORT_MESSAGE_CODE_000206 = "000206";// 发送状态修改失败
  public static final String SHORT_MESSAGE_CODE_000207 = "000207";// 短信剩余条数修改失败
  public static final String SHORT_MESSAGE_CODE_000302 = "000302";// 此发送模板不是邮件模板
  public static final String SHORT_MESSAGE_CODE_000305 = "000305";// 邮件发送失败
  public static final String SHORT_MESSAGE_CODE_000400 = "000400";// 您的验证码错误，请重新输入
  public static final String SHORT_MESSAGE_CODE_000401 = "000401";// 您的验证码已过期，请重新获取
  public static final String SHORT_MESSAGE_CODE_000402 = "000402";// 验证状态修改失败
  public static final String SHORT_MESSAGE_CODE_000403 = "000403";// 验证时间修改失败

  // 预警事件类型
  public static Map<String, String> WARN_TYPE = new HashMap<String, String>();
  public static final String WARN_TYPE_ONE = "0";// 监控预警
  public static final String WARN_TYPE_TWO = "1";// 软件更新
  public static final String WARN_TYPE_TREE = "2";// 任务执行
  // 预警事件等级
  public static Map<String, String> WARN_LEVEL = new HashMap<String, String>();
  public static final String WARN_LEVEL_ONE = "0";// 严重
  public static final String WARN_LEVEL_TWO = "1";// 一般
  public static final String WARN_LEVEL_TREE = "2";// 提示
  // 预警方
  public static Map<String, String> WARN_PART = new HashMap<String, String>();
  public static final String WARN_PART_ONE = "0";// 系统
  public static final String WARN_PART_TWO = "1";// 引擎

  static {

    BACKUP_PERIOD.put(BACKUP_PERIOD_ONE, "小时");
    BACKUP_PERIOD.put(BACKUP_PERIOD_TWO, "天");
    BACKUP_PERIOD.put(BACKUP_PERIOD_THREE, "周");
    BACKUP_PERIOD.put(BACKUP_PERIOD_FOUR, "月");

    BACKUP_TIME_STATUS.put(BACKUP_TIME_STATUS_ZERO, "未更新");
    BACKUP_TIME_STATUS.put(BACKUP_TIME_STATUS_ONE, "已更新");

    USER_STATUS_TYPE.put(USER_STATUS_TYPE_ZERO, "正常");
    USER_STATUS_TYPE.put(USER_STATUS_TYPE_ONE, "停用");

    TERMINAL_STATUS_TYPE.put(TERMINAL_STATUS_TYPE_ZERO, "正常");
    TERMINAL_STATUS_TYPE.put(TERMINAL_STATUS_TYPE_ONE, "停用");

    DATESOURCE_RUN_STATUS_TYPE.put(DATESOURCE_RUN_STATUS_TYPE_ZERO, "等待备份");
    DATESOURCE_RUN_STATUS_TYPE.put(DATESOURCE_RUN_STATUS_TYPE_ONE, "备份中");
    DATESOURCE_RUN_STATUS_TYPE.put(DATESOURCE_RUN_STATUS_TYPE_TWO, "错误");
    DATESOURCE_RUN_STATUS_TYPE.put(DATESOURCE_RUN_STATUS_TYPE_THREE, "成功");
    
    DATESOURCE_DS_STATUS_TYPE.put(DATESOURCE_DS_STATUS_TYPE_ZERO, "启用");
    DATESOURCE_DS_STATUS_TYPE.put(DATESOURCE_DS_STATUS_TYPE_ONE, "禁用");

    DATESOURCE_TYPE.put(DATESOURCE_TYPE_ZERO, "文件夹");
    DATESOURCE_TYPE.put(DATESOURCE_TYPE_ONE, "数据库");
    DATESOURCE_TYPE.put(DATESOURCE_TYPE_TWO, "数据保险箱");

    BACKUP_TYPE.put(BACKUP_TYPE_ZERO, "实时备份");
    BACKUP_TYPE.put(BACKUP_TYPE_ONE, "定时备份");
    BACKUP_TYPE.put(BACKUP_TYPE_TWO, "手动备份");

    USER_TYPE.put(USER_TYPE_ZERO, "终端");
    USER_TYPE.put(USER_TYPE_ONE, "个人网盘");

    TASK_LOG_STATUS.put(TASK_LOG_STATUS_ZERO, "执行中");
    TASK_LOG_STATUS.put(TASK_LOG_STATUS_TWO, "成功");
    TASK_LOG_STATUS.put(TASK_LOG_STATUS_THREE, "失败");

    SP_TRANFER_LOG_STATUS.put(SP_TRANFER_LOG_STATUS_ZERO, "成功");
    SP_TRANFER_LOG_STATUS.put(SP_TRANFER_LOG_STATUS_ONE, "失败");

    HEART_LOG_LEVEL.put(HEART_LOG_LEVEL_ONE, "正常");
    HEART_LOG_LEVEL.put(HEART_LOG_LEVEL_THREE, "不正常");

    BIND_RESULT.put(BIND_RESULT_SAVE_SUCCESS, "保存成功");
    BIND_RESULT.put(BIND_RESULT_PARAM_ERROR, "参数（鉴权）校验错误");
    BIND_RESULT.put(BIND_RESULT_BIND, "设备被绑定");
    BIND_RESULT.put(BIND_RESULT_TERMINAL_NULL, "设备不存在");
    BIND_RESULT.put(BIND_RESULT_USER_NULL, "用户不存在");
    BIND_RESULT.put(BIND_RESULT_USER_NOT, "用户不属于该客户");
    BIND_RESULT.put(BIND_RESULT_CODE_ERROR, "服务器处理异常");

    USER_LOGIN_RESULT.put(USER_LOGIN_RESULT_SUCCESS, "登录成功");
    USER_LOGIN_RESULT.put(USER_LOGIN_RESULT_USERNAME_PASSWORD_ERROR, "用户名或密码错误");
    USER_LOGIN_RESULT.put(USER_LOGIN_RESULT_NO_AUTHORITY, "用户未授权该前置机");
    USER_LOGIN_RESULT.put(USER_LOGIN_RESULT_USER_DISABLE, "用户已经被禁用");
    USER_LOGIN_RESULT.put(USER_LOGIN_RESULT_PARAM_ERROR, "参数校验错误");
    USER_LOGIN_RESULT.put(USER_LOGIN_RESULT_ERROR, "服务端处理异常");

    TERMINAL_IS_USER.put(TERMINAL_IS_USER_ZERO, "物理前置机");
    TERMINAL_IS_USER.put(TERMINAL_IS_USER_ONE, "网盘用户");

    TERMINAL_IS_ENCRYPT_SRC.put(TERMINAL_IS_ENCRYPT_SRC_NO, "不加密");
    TERMINAL_IS_ENCRYPT_SRC.put(TERMINAL_IS_ENCRYPT_SRC_YES, "加密");

    TERMINAL_ENCRYPT_SRC_ALG.put(TERMINAL_ENCRYPT_SRC_ALG_RSA, "RSA");
    TERMINAL_ENCRYPT_SRC_ALG.put(TERMINAL_ENCRYPT_SRC_ALG_DES, "DES");
    TERMINAL_ENCRYPT_SRC_ALG.put(TERMINAL_ENCRYPT_SRC_ALG_3DES, "3DES");
    TERMINAL_ENCRYPT_SRC_ALG.put(TERMINAL_ENCRYPT_SRC_ALG_AES, "AES");

    TERMINAL_ALERT_OFFLINE.put(TERMINAL_ALERT_OFFLINE_NO, "不启用");
    TERMINAL_ALERT_OFFLINE.put(TERMINAL_ALERT_OFFLINE_YES, "启用");

    TERMINAL_ALERT_TASK_ERROR.put(TERMINAL_ALERT_TASK_ERROR_NO, "不启用");
    TERMINAL_ALERT_TASK_ERROR.put(TERMINAL_ALERT_TASK_ERROR_YES, "启用");

    TERMINAL_ALERT_SPACE_LACK.put(TERMINAL_ALERT_SPACE_LACK_NO, "不启用");
    TERMINAL_ALERT_SPACE_LACK.put(TERMINAL_ALERT_SPACE_LACK_YES, "启用");

    TERMINAL_ALERT_DS_ERROR.put(TERMINAL_ALERT_DS_ERROR_NO, "不启用");
    TERMINAL_ALERT_DS_ERROR.put(TERMINAL_ALERT_DS_ERROR_YES, "启用");

    TERMINAL_ALERT_LICENSE_OVER_TIME.put(TERMINAL_ALERT_LICENSE_OVER_TIME_NO, "不启用");
    TERMINAL_ALERT_LICENSE_OVER_TIME.put(TERMINAL_ALERT_LICENSE_OVER_TIME_YES, "启用");

    TERMINAL_ALERT_TYPE.put(TERMINAL_ALERT_TYPE_EMAIL, "邮件");
    TERMINAL_ALERT_TYPE.put(TERMINAL_ALERT_TYPE_MESSAGE, "短信");
    TERMINAL_ALERT_TYPE.put(TERMINAL_ALERT_TYPE_BOTH, "短信和邮件");

    TERMINAL_IS_RECORD_CHANGE.put(TERMINAL_IS_RECORD_CHANGE_NO, "不记录");
    TERMINAL_IS_RECORD_CHANGE.put(TERMINAL_IS_RECORD_CHANGE_YES, "记录");

    TERMINAL_IS_OPEN_SSL.put(TERMINAL_IS_OPEN_SSL_NO, "不启用");
    TERMINAL_IS_OPEN_SSL.put(TERMINAL_IS_OPEN_SSL_YES, "启用");

    TERMINAL_IS_SIGNATURE_SRC.put(TERMINAL_IS_SIGNATURE_SRC_NO, "不启用");
    TERMINAL_IS_SIGNATURE_SRC.put(TERMINAL_IS_SIGNATURE_SRC_YES, "启用");

    LOG_LEVEL.put(LOG_LEVEL_DEBUG, "调试");
    LOG_LEVEL.put(LOG_LEVEL_SUCCESS, "正常");
    LOG_LEVEL.put(LOG_LEVEL_WARNING, "预警");
    LOG_LEVEL.put(LOG_LEVEL_ERROR, "错误");

    LICENSE_STATUS.put(LICENSE_STATUS_NO, "无效");
    LICENSE_STATUS.put(LICENSE_STATUS_YES, "有效");

    TERMINAL_LICENSE_RESULT.put(TERMINAL_LICENSE_RESULT_SUCCESS, "校验成功");
    TERMINAL_LICENSE_RESULT.put(TERMINAL_LICENSE_RESULT_UREGISTER, "U盾未注册");
    TERMINAL_LICENSE_RESULT.put(TERMINAL_LICENSE_RESULT_U_USER, "U盾不属于当前客户");
    TERMINAL_LICENSE_RESULT.put(TERMINAL_LICENSE_RESULT_U_NOT_ENTERPRISE, "U盾非企业版");
    TERMINAL_LICENSE_RESULT.put(TERMINAL_LICENSE_RESULT_U_NOT_BIND, "U盾未绑定");
    TERMINAL_LICENSE_RESULT.put(TERMINAL_LICENSE_RESULT_U_NOT_TERMINAL, "U盾不属于当前前置机");
    TERMINAL_LICENSE_RESULT.put(TERMINAL_LICENSE_RESULT_DEVICE_NOT_BIND, "设备未绑定");
    TERMINAL_LICENSE_RESULT.put(TERMINAL_LICENSE_RESULT_DEVICE_EXIST_ANOTHER_BIND, "设备已被其他授权绑定");
    TERMINAL_LICENSE_RESULT.put(TERMINAL_LICENSE_RESULT_LICENSE_NOT_EXIST, "授权不存在");
    TERMINAL_LICENSE_RESULT.put(TERMINAL_LICENSE_RESULT_LICENSE_OVERDUE, "授权已过期");
    TERMINAL_LICENSE_RESULT.put(TERMINAL_LICENSE_RESULT_LICENSE_REVOKE, "授权被吊销");
    TERMINAL_LICENSE_RESULT.put(TERMINAL_LICENSE_RESULT_PARAM_ERROR, "参数校验错误");
    TERMINAL_LICENSE_RESULT.put(TERMINAL_LICENSE_RESULT_CODE_ERROR, "服务端处理异常");
    TERMINAL_LICENSE_RESULT.put(TERMINAL_LICENSE_RESULT_NORMAL, "正常");


    PERSONAL_LICENSE_RESULT.put(PERSONAL_LICENSE_RESULT_SUCCESS, "校验成功");
    PERSONAL_LICENSE_RESULT.put(PERSONAL_LICENSE_RESULT_UREGISTER, "U盾未注册");
    PERSONAL_LICENSE_RESULT.put(PERSONAL_LICENSE_RESULT_NOT_PERSONAL, "U盾非个人版");
    PERSONAL_LICENSE_RESULT.put(PERSONAL_LICENSE_RESULT_U_NOT_BIND, "U盾未绑定");
    PERSONAL_LICENSE_RESULT.put(PERSONAL_LICENSE_RESULT_DEVICE_NOT_BIND, "设备未绑定");
    PERSONAL_LICENSE_RESULT.put(PERSONAL_LICENSE_RESULT_DEVICE_EXIST_ANOTHER_BIND, "设备已被其他授权绑定");
    PERSONAL_LICENSE_RESULT.put(PERSONAL_LICENSE_RESULT_LICENSE_NOT_EXIST, "授权不存在");
    PERSONAL_LICENSE_RESULT.put(PERSONAL_LICENSE_RESULT_LICENSE_OVERDUE, "授权已过期");
    PERSONAL_LICENSE_RESULT.put(PERSONAL_LICENSE_RESULT_LICENSE_REVOKE, "授权被吊销");
    PERSONAL_LICENSE_RESULT.put(PERSONAL_LICENSE_RESULT_PARAM_ERROR, "参数校验错误");
    PERSONAL_LICENSE_RESULT.put(PERSONAL_LICENSE_RESULT_CODE_ERROR, "服务端处理异常");
    PERSONAL_LICENSE_RESULT.put(PERSONAL_LICENSE_RESULT_NORMAL, "正常");

    STORAGE_FILE_TO_DO_STATUS.put(STORAGE_FILE_TO_DO_STATUS_NO, "没有处理");
    STORAGE_FILE_TO_DO_STATUS.put(STORAGE_FILE_TO_DO_STATUS_YES, "处理中");

    STORAGE_VERSION_TREE_TO_DO_STATUS.put(STORAGE_VERSION_TREE_TO_DO_STATUS_NO, "没有处理");
    STORAGE_VERSION_TREE_TO_DO_STATUS.put(STORAGE_VERSION_TREE_TO_DO_STATUS_YES, "处理中");

    BACK_STRATEGY_BACKUP_TIME_UPDATE.put(BACK_STRATEGY_BACKUP_TIME_UPDATE_NO, "未更新");
    BACK_STRATEGY_BACKUP_TIME_UPDATE.put(BACK_STRATEGY_BACKUP_TIME_UPDATE_YES, "更新");

    USER_LOGIN_SAFT_RESULT.put(USER_LOGIN_SAFT_RESULT_SUCCESS, "登陆成功");
    USER_LOGIN_SAFT_RESULT.put(USER_LOGIN_SAFT_RESULT_USERNAME_PWD_ERROR, "用户名或密码错误");
    USER_LOGIN_SAFT_RESULT.put(USER_LOGIN_SAFT_RESULT_LICENSE_NO, "用户未授权该前置机");
    USER_LOGIN_SAFT_RESULT.put(USER_LOGIN_SAFT_RESULT_USER_NO, "用户已经被禁用");
    USER_LOGIN_SAFT_RESULT.put(USER_LOGIN_SAFT_RESULT_ERROR, "参数校验错误");
    USER_LOGIN_SAFT_RESULT.put(USER_LOGIN_SAFT_RESULT_CODE_ERROR, "服务端处理异常");


    Add_RESOURCE.put(Add_RESOURCE_SUCCESS, "保存成功");
    Add_RESOURCE.put(Add_RESOURCE_SOURCE_EXIST, "同类配置源已经存在");
    Add_RESOURCE.put(Add_RESOURCE_USERSESSION_INVALID, "用户会话ID失效");
    Add_RESOURCE.put(Add_RESOURCE_PARAM_ERROR, "参数（鉴权）校验错误");
    Add_RESOURCE.put(Add_RESOURCE_CODE_ERROR, "服务端好处理异常");
    DATASOURCE_TRUE_OR_FALSE.put(DATASOURCE_TRUE, "true");
    DATASOURCE_TRUE_OR_FALSE.put(DATASOURCE_FALSE, "false");

    HTTP_TOKEN_VERIFY_RESULT.put(HTTP_TOKEN_VERIFY_ZERO, "令牌被修改过，请重新登录获取可用令牌");
    HTTP_TOKEN_VERIFY_RESULT.put(HTTP_TOKEN_VERIFY_ONE, "令牌失效，请重新登录获取可用令牌");
    HTTP_TOKEN_VERIFY_RESULT.put(HTTP_TOKEN_VERIFY_TWO, "令牌的用户不存在，请重新登录获取可用令牌");
    HTTP_TOKEN_VERIFY_RESULT.put(HTTP_TOKEN_VERIFY_THREE, "令牌的用户被禁用了，请用可用的用户登录获取可用令牌");

    LAB_TYPE.put(LAB_TYPE_ZERO, "无授权");
    LAB_TYPE.put(LAB_TYPE_ONE, "key无关联设备");
    LAB_TYPE.put(LAB_TYPE_TWO, "授权码无关联设备");
    LAB_TYPE.put(LAB_TYPE_THREE, "key关联设备");
    LAB_TYPE.put(LAB_TYPE_FOUR, "授权码关联设备");

    USER_SAFE_LEVEL.put(USER_SAFE_LEVEL_ZERO, "key+动态码");

    ROLE.put(ROLE_SYSADMIN, "系统管理人员");
    ROLE.put(ROLE_ADMIN, "客户管理员");
    ROLE.put(ROLE_USER, "普通用户");

    IS_BIND.put(IS_BIND_ZERO, "未绑定");
    IS_BIND.put(IS_BIND_ONE, "已绑定");

    SHORT_MESSAGE_CODE.put(SHORT_MESSAGE_CODE_000000, "验证码发送成功");
    SHORT_MESSAGE_CODE.put(SHORT_MESSAGE_CODE_000001, "验证通过");
    SHORT_MESSAGE_CODE.put(SHORT_MESSAGE_CODE_0000002, "密钥验证错误");
    SHORT_MESSAGE_CODE.put(SHORT_MESSAGE_CODE_000003, "用户不存在");
    SHORT_MESSAGE_CODE.put(SHORT_MESSAGE_CODE_000004, "用户剩余条数不足");
    SHORT_MESSAGE_CODE.put(SHORT_MESSAGE_CODE_000005, "参数缺失");
    SHORT_MESSAGE_CODE.put(SHORT_MESSAGE_CODE_000006, "参数异常");
    SHORT_MESSAGE_CODE.put(SHORT_MESSAGE_CODE_000007, "链接超时");
    SHORT_MESSAGE_CODE.put(SHORT_MESSAGE_CODE_000100, "系统中不存在此模板ID");
    SHORT_MESSAGE_CODE.put(SHORT_MESSAGE_CODE_000201, "此模板ID不属于此账号");
    SHORT_MESSAGE_CODE.put(SHORT_MESSAGE_CODE_000202, "此模板不是短信模板");
    SHORT_MESSAGE_CODE.put(SHORT_MESSAGE_CODE_000203, "模板状态审核中...暂时无法使用此模板，请更换");
    SHORT_MESSAGE_CODE.put(SHORT_MESSAGE_CODE_000204, "模板审核未通过，无法使用");
    SHORT_MESSAGE_CODE.put(SHORT_MESSAGE_CODE_000205, "短信发送失败");
    SHORT_MESSAGE_CODE.put(SHORT_MESSAGE_CODE_000206, "发送状态修改失败");
    SHORT_MESSAGE_CODE.put(SHORT_MESSAGE_CODE_000207, "短信剩余条数修改失败");
    SHORT_MESSAGE_CODE.put(SHORT_MESSAGE_CODE_000302, "此发送模板不是邮件模板");
    SHORT_MESSAGE_CODE.put(SHORT_MESSAGE_CODE_000305, "邮件发送失败");
    SHORT_MESSAGE_CODE.put(SHORT_MESSAGE_CODE_000400, "您的验证码错误，请重新输入");
    SHORT_MESSAGE_CODE.put(SHORT_MESSAGE_CODE_000401, "您的验证码已过期，请重新获取");
    SHORT_MESSAGE_CODE.put(SHORT_MESSAGE_CODE_000402, "验证状态修改失败");
    SHORT_MESSAGE_CODE.put(SHORT_MESSAGE_CODE_000403, "验证时间修改失败");

    WARN_TYPE.put(WARN_TYPE_ONE, "监控预警");
    WARN_TYPE.put(WARN_TYPE_TWO, "软件更新");
    WARN_TYPE.put(WARN_TYPE_TREE, "任务执行");

    WARN_LEVEL.put(WARN_LEVEL_ONE, "严重");
    WARN_LEVEL.put(WARN_LEVEL_TWO, "一般");
    WARN_LEVEL.put(WARN_LEVEL_TREE, "提示");

    WARN_PART.put(WARN_PART_ONE, "系统");
    WARN_PART.put(WARN_PART_TWO, "任务引擎");

  }

  /**
   * @author 许炜毅
   * @Description 根据传入的用户状态标识，获取标识所对应的中文值
   * @param key 用户状态标识
   * @return String 得到中文值
   * @date 2015年8月5日下午2:08:03
   */
  public static String getUserStatus(String key) {
    return USER_STATUS_TYPE.get(key);// sd
  }

  /**
   * @author 许炜毅
   * @Description 通过使用标识 返回中文值
   * @param key
   * @return String
   * @date 2015年8月7日上午11:37:16
   *
   * @修改人
   * @修改日期
   */
  public static String getUserType(String key) {
    return USER_TYPE.get(key);
  }

}
